import { request } from "@/api/request";
export const doLogin = (data) => {
    return request({
        url: "login/doLogin",
        method: "post",
        data,
        config: {
            timeout: 10000,
            headers: {
                "Content-Type": "application/json;charset=utf-8",
            },
        },
    });
};


export const getNotice = () => {
    return request({
        url: "notice/get",
        method: "get",
    });
};


export const getFriends = () => {
    return request({
        url: "friend/getList",
        method: "get"
    })
}

export const getChatRecordList=()=>{
    return request({
        url: 'chatRecord/getList',
        method: 'get'
    })
}

export const sendMessage=async (data)=>{
    return request({
        data,
        url: 'chat/single',
        method: 'post'
    })
}

export const getUserInfo=()=>{
    return request({
        url: 'user/get',
        method: 'get'
    })
}